let DATA_LIST = []

// const obj = {
//   areaNo: `A`,
//   shelvesList: [{
//     shelvesNo: `A`,
//     locationList: [{
//       locationNo: `1`,
//       seatList: [{
//         seatNo: `AA1-01`
//       }],
//     }]
//   }],
// }

// 模拟数据
const mockData = () => {
  const AREA_LIST = [`A`, `B`, `C`, `D`]// 4个区域
  const SHELVES_LIST = [`A`, `B`, `C`, `D`, `E`, `F`, `G`, `H`] // 8个货架
  const LOCATION_LIST = [`1`, `2`, `3`]// 3层货架

  DATA_LIST = AREA_LIST.map(area => {
    const areaObj = {
      areaNo: area,
      className: area === `A` || area === `C` ? `w_p_70` : `w_p_30`,
    }

    const shelvesList = SHELVES_LIST.map(shelves => {
      const shelvesObj = {
        shelvesNo: shelves,
      }

      const locationList = LOCATION_LIST.map(location => {
        const locationObj = {
          locationNo: location,
        }
        const seatList = []
        const seatLength = area === `A` || area === `C` ? 18 : 10
        for (let i = 1; i < seatLength; i++) {
          const seatNo = i > 10 ? i.toString() : `0${i}`
          const seatObj = {
            seatNo: `${area}${shelves}${location}-${seatNo}`
          }
          seatList.push(seatObj)
        }
        locationObj.seatList = seatList

        return locationObj
      })

      shelvesObj.locationList = locationList

      return shelvesObj
    })

    areaObj.shelvesList = shelvesList
    return areaObj
  })
}

mockData()


const ACTIVE_DATA_LIST = [`AE1-03`, `AF2-08`, `CB3-08`, `DB1-03`, `BE3-02`, `BC3-05`, `AB3-15`, `AB2-11`, `AA2-07`, `AC2-15`, `BG3-01`, `BE3-04`, `BD1-09`, `AA1-11`]

export {
  DATA_LIST,
  ACTIVE_DATA_LIST,
}
